<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>股票监控系统</title>
  <link rel="stylesheet" href="/css/style.css">
</head>
<body>
  <div class="container">
    <header>
      <h1>股票监控系统</h1>
    </header>
    
    <main>
      <section class="stock-form">
        <h2>添加股票</h2>
        <form id="add-stock-form">
          <div class="form-group">
            <label for="stock-code">股票代码:</label>
            <input type="text" id="stock-code" name="code" required placeholder="例如: 600000">
          </div>
          <div class="form-group">
            <label for="stock-name">股票名称:</label>
            <input type="text" id="stock-name" name="name" placeholder="可选，如不填写将自动获取">
          </div>
          <button type="submit" class="btn btn-primary">添加</button>
        </form>
      </section>
      
      <section class="stock-list">
        <div class="stock-list-header">
          <h2>股票列表</h2>
          <button id="refresh-btn" class="btn btn-secondary">🔄 刷新数据</button>
        </div>
        <div class="stock-cards" id="stock-list">
          <!-- 股票卡片将通过JavaScript动态添加 -->
        </div>
      </section>
    </main>
    
    <footer>
      <p>&copy; 2023 股票监控系统</p>
    </footer>
  </div>
  
  <!-- 股票详情模态框 -->
  <div id="stock-modal" class="modal">
    <div class="modal-content">
      <span class="close">&times;</span>
      <h2 id="modal-stock-name"></h2>
      <div id="modal-stock-details">
        <div class="loading">加载中...</div>
      </div>
    </div>
  </div>
  
  <script src="/js/main.js"></script>
</body>
</html>